<template>
	<view id="app">
		<view class="container fdc">
			<view class="df fdc mtb10 bgw ">
				<view class="df ptb20 plr15 bdb1s brcce">
					<view class="w300 h180 br15 courseImg"><image :src="order.course_thumb"></image></view>
					<view class="f1 ml15 df fdc">
						<view class="f28 fw4 h120 t2hd">{{order.course_title}}</view>
						<view class="df aic cdebug f32 fw8">¥{{order.order_price}}</view>
					</view>
				</view>
			</view>
			<view class="bgw mt20 df fdc aic plr20">
				<view class="wh300 mtb30">
					<image :src="courseimg"></image>
				</view>
				<view class="rows ptb20 w100p">
					<view class="plr30 df fdc">
						<view class="f26 c666">开营:{{order.start_time}}</view>
						<view class="f26 c666">结营:{{order.end_time}}</view>
						<view class="c000 f28 ptb10">{{order.order_sn}}</view>
					</view>
					<view class="bd1s brcce c000 plr20 ptb15 br15 f28" @click="handle('member/order/refund?id='+order.id)">申请退款</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	let that ;
	export default {
		data() {
			return {
				id:0,
				order:{},
			}
		},
		onLoad(e){
			that = this;
			if(e.id){
				this.id = e.id;
			}
			this.getDetail()
		},
		methods: {
			getDetail:function(){
				this.request({
					url:"/api/order/detail",
					data:{id:this.id},
					success:function(rlt){
						if(rlt.code == '200'){
							that.order = rlt.data;
						}
					}
				})
			},
			handle(e){
				uni.navigateTo({
					url:"/pages/"+e,
				})
			}
		},
	}
</script>

<style>

</style>
